package org.woozoo.xhtml.unittests.selectorsuite
{
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	
	import org.flexunit.asserts.assertTrue;
	import org.flexunit.async.Async;
	
	public class CaseSpeed extends CaseBase
	{
		[Before(async)]
		public function load() : void {
			var loader : URLLoader = new URLLoader();
			var handler : Function = Async.asyncHandler(this, __loadSuccess, 1000);
			loader.addEventListener(Event.COMPLETE, handler);
			loader.load(new URLRequest('assets/xhtml/test-page.html'));
		}
		
		private function __loadSuccess(e : Event, passThrought : Object) : void {
			createDocumentFromXML(XML((e.currentTarget as URLLoader).data));
		}
	}
}